Rename ostree-cmdprivate to drop out of introspection
authorColin Walters <walters@verbum.org>
Thu, 2 Jun 2022 21:13:17 +0000 (17:13 -0400)
committerColin Walters <walters@verbum.org>
Thu, 2 Jun 2022 21:13:17 +0000 (17:13 -0400)
I was looking at our `.gir` and noticed we had the cmdprivate bits
because the pattern for excluding headers is `-private.h`, which
didn't match `cmdprivate.h`.

14 files changed:
Makefile-libostree.am
apidoc/Makefile.am
src/libostree/ostree-cmd-private.c [new file with mode: 0644]
src/libostree/ostree-cmd-private.h [new file with mode: 0644]
src/libostree/ostree-cmdprivate.c [deleted file]
src/libostree/ostree-cmdprivate.h [deleted file]
src/libostree/ostree-impl-system-generator.c
src/libostree/ostree-repo-static-delta-core.c
src/ostree/ot-admin-builtin-boot-complete.c
src/ostree/ot-admin-builtin-finalize-staged.c
src/ostree/ot-admin-instutil-builtin-grub2-generate.c
src/ostree/ot-builtin-fsck.c
src/ostree/ot-builtin-static-delta.c
src/switchroot/ostree-system-generator.c

index af89ce9a4a5379e7525076a53e16bcb2331088f3..c5c1fb1e100708f345165470b880ffceaf1dc67b 100644 (file)
@@ -53,8 +53,8 @@ CLEANFILES += $(BUILT_SOURCES)
 
 libostree_1_la_SOURCES = \
        src/libostree/ostree-async-progress.c \
-       src/libostree/ostree-cmdprivate.h \
-       src/libostree/ostree-cmdprivate.c \
+       src/libostree/ostree-cmd-private.h \
+       src/libostree/ostree-cmd-private.c \
        src/libostree/ostree-core-private.h \
        src/libostree/ostree-core.c \
        src/libostree/ostree-date-utils.c \
index 7b824d5af441a4e1e786252081a04aee394c9773..80039d1bcca09fc4c8639bec751f9fb489fe8283 100644 (file)
@@ -71,7 +71,7 @@ IGNORE_HFILES= \
        ostree-bootloader-grub2.h \
        ostree-bootloader-syslinux.h \
        ostree-bootloader-uboot.h \
-       ostree-cmdprivate.h \
+       ostree-cmd-private.h \
        ostree-core-private.h \
        ostree-fetcher.h \
        ostree-gpg-verifier.h \
diff --git a/src/libostree/ostree-cmd-private.c b/src/libostree/ostree-cmd-private.c
new file mode 100644 (file)
index 0000000..ad820fd
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2014 Colin Walters <walters@verbum.org>
+ *
+ * SPDX-License-Identifier: LGPL-2.0+
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include "ostree-cmd-private.h"
+#include "ostree-repo-private.h"
+#include "ostree-core-private.h"
+#include "ostree-repo-static-delta-private.h"
+#include "ostree-sysroot-private.h"
+#include "ostree-bootloader-grub2.h"
+
+#include "otutil.h"
+
+static gboolean 
+impl_ostree_generate_grub2_config (OstreeSysroot *sysroot, int bootversion, int target_fd, GCancellable *cancellable, GError **error)
+{
+  return _ostree_bootloader_grub2_generate_config (sysroot, bootversion, target_fd, cancellable, error);
+}
+
+/**
+ * ostree_cmdprivate: (skip)
+ *
+ * Do not call this function; it is used to share private API between
+ * the OSTree commandline and the library.
+ */
+const OstreeCmdPrivateVTable *
+ostree_cmd__private__ (void)
+{
+  static OstreeCmdPrivateVTable table = {
+    _ostree_impl_system_generator,
+    impl_ostree_generate_grub2_config,
+    _ostree_repo_static_delta_dump,
+    _ostree_repo_static_delta_query_exists,
+    _ostree_repo_static_delta_delete,
+    _ostree_repo_verify_bindings,
+    _ostree_sysroot_finalize_staged,
+    _ostree_sysroot_boot_complete,
+  };
+
+  return &table;
+}
diff --git a/src/libostree/ostree-cmd-private.h b/src/libostree/ostree-cmd-private.h
new file mode 100644 (file)
index 0000000..17f943c
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2014 Colin Walters <walters@verbum.org>
+ *
+ * SPDX-License-Identifier: LGPL-2.0+
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include "ostree-types.h"
+
+G_BEGIN_DECLS
+
+gboolean _ostree_impl_system_generator (const char *ostree_cmdline, const char *normal_dir, const char *early_dir, const char *late_dir, GError **error);
+
+typedef struct {
+  gboolean (* ostree_system_generator) (const char *ostree_cmdline, const char *normal_dir, const char *early_dir, const char *late_dir, GError **error);
+  gboolean (* ostree_generate_grub2_config) (OstreeSysroot *sysroot, int bootversion, int target_fd, GCancellable *cancellable, GError **error);
+  gboolean (* ostree_static_delta_dump) (OstreeRepo *repo, const char *delta_id, GCancellable *cancellable, GError **error);
+  gboolean (* ostree_static_delta_query_exists) (OstreeRepo *repo, const char *delta_id, gboolean *out_exists, GCancellable *cancellable, GError **error);
+  gboolean (* ostree_static_delta_delete) (OstreeRepo *repo, const char *delta_id, GCancellable *cancellable, GError **error);
+  gboolean (* ostree_repo_verify_bindings) (const char *collection_id, const char *ref_name, GVariant *commit, GError **error);
+  gboolean (* ostree_finalize_staged) (OstreeSysroot *sysroot, GCancellable *cancellable, GError **error);
+  gboolean (* ostree_boot_complete) (OstreeSysroot *sysroot, GCancellable *cancellable, GError **error);
+} OstreeCmdPrivateVTable;
+
+/* Note this not really "public", we just export the symbol, but not the header */
+_OSTREE_PUBLIC const OstreeCmdPrivateVTable *
+ostree_cmd__private__ (void);
+
+G_END_DECLS
diff --git a/src/libostree/ostree-cmdprivate.c b/src/libostree/ostree-cmdprivate.c
deleted file mode 100644 (file)
index f6c114f..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2014 Colin Walters <walters@verbum.org>
- *
- * SPDX-License-Identifier: LGPL-2.0+
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <https://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-
-#include "ostree-cmdprivate.h"
-#include "ostree-repo-private.h"
-#include "ostree-core-private.h"
-#include "ostree-repo-static-delta-private.h"
-#include "ostree-sysroot-private.h"
-#include "ostree-bootloader-grub2.h"
-
-#include "otutil.h"
-
-static gboolean 
-impl_ostree_generate_grub2_config (OstreeSysroot *sysroot, int bootversion, int target_fd, GCancellable *cancellable, GError **error)
-{
-  return _ostree_bootloader_grub2_generate_config (sysroot, bootversion, target_fd, cancellable, error);
-}
-
-/**
- * ostree_cmdprivate: (skip)
- *
- * Do not call this function; it is used to share private API between
- * the OSTree commandline and the library.
- */
-const OstreeCmdPrivateVTable *
-ostree_cmd__private__ (void)
-{
-  static OstreeCmdPrivateVTable table = {
-    _ostree_impl_system_generator,
-    impl_ostree_generate_grub2_config,
-    _ostree_repo_static_delta_dump,
-    _ostree_repo_static_delta_query_exists,
-    _ostree_repo_static_delta_delete,
-    _ostree_repo_verify_bindings,
-    _ostree_sysroot_finalize_staged,
-    _ostree_sysroot_boot_complete,
-  };
-
-  return &table;
-}
diff --git a/src/libostree/ostree-cmdprivate.h b/src/libostree/ostree-cmdprivate.h
deleted file mode 100644 (file)
index 17f943c..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2014 Colin Walters <walters@verbum.org>
- *
- * SPDX-License-Identifier: LGPL-2.0+
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <https://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "ostree-types.h"
-
-G_BEGIN_DECLS
-
-gboolean _ostree_impl_system_generator (const char *ostree_cmdline, const char *normal_dir, const char *early_dir, const char *late_dir, GError **error);
-
-typedef struct {
-  gboolean (* ostree_system_generator) (const char *ostree_cmdline, const char *normal_dir, const char *early_dir, const char *late_dir, GError **error);
-  gboolean (* ostree_generate_grub2_config) (OstreeSysroot *sysroot, int bootversion, int target_fd, GCancellable *cancellable, GError **error);
-  gboolean (* ostree_static_delta_dump) (OstreeRepo *repo, const char *delta_id, GCancellable *cancellable, GError **error);
-  gboolean (* ostree_static_delta_query_exists) (OstreeRepo *repo, const char *delta_id, gboolean *out_exists, GCancellable *cancellable, GError **error);
-  gboolean (* ostree_static_delta_delete) (OstreeRepo *repo, const char *delta_id, GCancellable *cancellable, GError **error);
-  gboolean (* ostree_repo_verify_bindings) (const char *collection_id, const char *ref_name, GVariant *commit, GError **error);
-  gboolean (* ostree_finalize_staged) (OstreeSysroot *sysroot, GCancellable *cancellable, GError **error);
-  gboolean (* ostree_boot_complete) (OstreeSysroot *sysroot, GCancellable *cancellable, GError **error);
-} OstreeCmdPrivateVTable;
-
-/* Note this not really "public", we just export the symbol, but not the header */
-_OSTREE_PUBLIC const OstreeCmdPrivateVTable *
-ostree_cmd__private__ (void);
-
-G_END_DECLS
index 92d71605f97c5fbb1074341fd40da43110b376b1..da4654b9e9ac99e55a48f703839b31ddcc290005 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "ostree.h"
 #include "ostree-core-private.h"
-#include "ostree-cmdprivate.h"
+#include "ostree-cmd-private.h"
 
 #ifdef HAVE_LIBMOUNT
 typedef FILE OtLibMountFile;
index 7e6611dadd0d89cd8c8eb89d101e0359d73fb401..7854211fcb76ee96aceba189c841b119e5800bae 100644 (file)
@@ -25,7 +25,7 @@
 #include "ostree-core-private.h"
 #include "ostree-repo-private.h"
 #include "ostree-lzma-decompressor.h"
-#include "ostree-cmdprivate.h"
+#include "ostree-cmd-private.h"
 #include "ostree-checksum-input-stream.h"
 #include "ostree-repo-static-delta-private.h"
 #include "otutil.h"
index 6e1052f585cacd3179ef58c628f3963a2c5f5771..5d50c028751a426f1a76fc891eb30f3090be2346 100644 (file)
@@ -27,7 +27,7 @@
 #include "ostree.h"
 #include "otutil.h"
 
-#include "ostree-cmdprivate.h"
+#include "ostree-cmd-private.h"
 
 static GOptionEntry options[] = {
   { NULL }
index 17b6a6255a96380f05db87638a079052425e0ef0..eedffdded86f324fa5cb6378eaa11a3aa641302e 100644 (file)
@@ -29,7 +29,7 @@
 #include "ostree.h"
 #include "otutil.h"
 
-#include "ostree-cmdprivate.h"
+#include "ostree-cmd-private.h"
 #include "ostree.h"
 
 static GOptionEntry options[] = {
index af3fa6713b5569310d09f8a829a1d3653d33b0ef..d35984601e0d4c52e07bd0b72aecbce1208cdea5 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "ot-main.h"
 #include "ot-admin-instutil-builtins.h"
-#include "ostree-cmdprivate.h"
+#include "ostree-cmd-private.h"
 
 #include "otutil.h"
 
index 042b157d5702341cf97da122c40f5541f3b6f619..9e3f77eff546bc2ab78786e004328b13c433d734 100644 (file)
@@ -25,7 +25,7 @@
 #include "ot-main.h"
 #include "ot-builtins.h"
 #include "ostree.h"
-#include "ostree-cmdprivate.h"
+#include "ostree-cmd-private.h"
 #include "otutil.h"
 
 static gboolean opt_quiet;
index 99faf86164636e816a7b4d5c267103db79ab164d..a5483c1732d15a4079e53f6c48692b9df4b4836b 100644 (file)
@@ -22,7 +22,7 @@
 #include "ot-main.h"
 #include "ot-builtins.h"
 #include "ostree.h"
-#include "ostree-cmdprivate.h"
+#include "ostree-cmd-private.h"
 #include "ot-main.h"
 #include "otutil.h"
 
index 4b42176f108a24bb0dac9e6398c1eb8a62a61d47..bd0901bcfff0aa9ca4b125e2296c02edda2f5ff9 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <libglnx.h>
 
-#include "ostree-cmdprivate.h"
+#include "ostree-cmd-private.h"
 #include "ostree-mount-util.h"
 
 static const char *arg_dest = "/tmp";